<template>
	<view class="normal-login-container">
		<Avatar :size="65" class="avatar" url=""></Avatar>
		<image class="starttext" @tap="login" src="../static/images/font/starttext.png" mode="aspectFit"></image>
		<image class="arrow arrow-up-down" @tap="login" src="../static/images/icon/arrow-down.png" mode="aspectFit"></image>
		<view class="buttons flex">
			<view @tap="login">登录</view>
			<view @tap="register">注册</view>
		</view>
	</view>
</template>

<script>
	import Avatar from '@/components/Avatar.vue'

	export default {
		components: {
			Avatar,
		},
		data() {
			return {
				//
			};
		},
		methods: {
			login() {
				// 跳转到登录页面
				uni.navigateTo({
					url: '/pages/login'
				});
			},
			register() {
				// 跳转到注册页面
				uni.navigateTo({
					url: '/pages/register'
				});
			}
		}
	}
</script>

<style lang="scss">
	$primary-color: #000000;
	$secondary-color: #ffffff;
	$green: #03D482;

	page {
		background-image: url("../static/images/background/3.open2.jpg");
		background-size: cover;
	}

	.normal-login-container {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		// height: 100vh;

		.avatar {
			position: absolute;
			top: 95upx;
			right: 38upx;
		}
		
		.starttext {
			width: 430upx;
			height: 220upx;
			margin-top: 53.6vh;
		}

		.arrow {
			width: 85upx;
			height: 60upx;
			margin-top: 46upx;
			animation: arrow-up-down-data-v-18c49c0e 1.2s 0.7s infinite cubic-bezier(0.44, 0.04, 0.28, 0.99);
		}

		@keyframes arrow-up-down {
			0% {
				top: 0;
			}

			50% {
				top: 16upx;
			}

			100% {
				top: 0;
			}
		}

		.buttons {
			display: flex;
			position: absolute;
			justify-content: space-between;
			width: 28%;
			bottom: 2vh;
			bottom: 30upx;
			left: calc(50% - 15%);
			font-weight: bold;
			margin-left: 7upx;

			button {
				width: 40%;
				height: 40px;
				border-radius: 10px;
				background-color: $primary-color;
				color: $secondary-color;

				&:hover {
					background-color: lighten($primary-color, 10%);
				}
			}
		}
	}
</style>